Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

filter(cons(X), 0, M) → cons(0)
filter(cons(X), s(N), M) → cons(X)
sieve(cons(0)) → cons(0)
sieve(cons(s(N))) → cons(s(N))
nats(N) → cons(N)
zprimessieve(nats(s(s(0))))

Q is empty.


QTRS
  ↳ DirectTerminationProof

Q restricted rewrite system:
The TRS R consists of the following rules:

filter(cons(X), 0, M) → cons(0)
filter(cons(X), s(N), M) → cons(X)
sieve(cons(0)) → cons(0)
sieve(cons(s(N))) → cons(s(N))
nats(N) → cons(N)
zprimessieve(nats(s(s(0))))

Q is empty.

We use [23] with the following order to prove termination.

Lexicographic path order with status [19].
Quasi-Precedence:
zprimes > s1 > cons1 > [filter3, 0]
zprimes > sieve1 > [filter3, 0]
zprimes > nats1 > cons1 > [filter3, 0]

Status:
filter3: [3,2,1]
sieve1: [1]
zprimes: multiset
s1: [1]
0: multiset
cons1: [1]
nats1: [1]